const { stock } = require(".")

module.exports = (sequelize, Sequelize) => {
	const stock = sequelize.define(
		'stock_info',
		{
			medInfoId: { type: Sequelize.STRING(10), primaryKey: true },
            medName: { type: Sequelize.STRING(30), allowNull: false },
            stockNum: { type: Sequelize.INTEGER, allowNull: false },
            pharmacyPlace: { type: Sequelize.STRING(100), allowNull: false },
            pharmacyId: { type: Sequelize.STRING(10), allowNull: false },
		},
		{
			// 禁止 updatedAt, createdAt 自增
			timestamps: false,
			// 自定义表名
			freezeTableName: true,
		}
	)

	return stock
}
